<?php
// Assign to clniConfig
$conf = Celini::configInstance();

$translate = Zend_Registry::get('Zend_Translate');
$lang = $_SESSION['lang'];
try {

	$translate->addTranslation(realpath(dirname(__FILE__))."/languages/$lang", $lang,array('scan' => Zend_Translate::LOCALE_DIRECTORY,
			'disableNotices'=>true,
			'clear'=>false
		));

} catch (Exception $ex) {
	//if exception while loading selected lang folder
	//we load the default langugage folder.
	$translate->addTranslation(realpath(dirname(__FILE__))."/languages/".$config['lang']['default'], $config['lang']['default'],array('scan' => Zend_Translate::LOCALE_DIRECTORY,
			'disableNotices'=>true,
			'clear'=>false
		));
}

?>
